<template>
  <uv-toast ref="toastRef"></uv-toast>
</template>
<script setup lang="ts">
import { ref } from 'vue';
const toastRef = ref();
const showToast = (msg: string, type = 'error', callBack: () => {}) => {
  toastRef.value.show({
    message: msg,
    duration: 2000,
    type: type,
    complete() {
      callBack && callBack();
    }
  });
};
defineExpose({ showToast });
</script>
<style lang="scss"></style>
